<template>
  <div class="clos">
    <van-row :gutter="[12, 12]">
      <van-col span="12" v-for="(item, index) in objData" :key="index">
        <div class="clos-content">
          <div class="content-img">
            <img :src="item.imgUrl" alt="" />
            <div class="tag" v-if="item.tag">{{ item.tag }}</div>
          </div>
          <div class="btn-info">
            <div class="title">{{ item.title }}</div>
            <div class="desc">{{ item.desc }}</div>
            <div class="wrap-desc">
              <span class="pic">{{ item.money }}</span>
              <span class="text">{{ item.name1 }}</span>
              <span class="pic">{{ item.xf }}</span>
              <span class="text">{{ item.name2 }}</span>
            </div>
          </div>
        </div>
      </van-col>
    </van-row>
  </div>
</template>
<script setup>
const props = defineProps({
  objData: {
    type: Array,
    default: [],
  },
});
</script>
<style scoped lang="scss">
.clos {
  .clos-content {
    background: #ffffff;
    border-radius: 8px;
    .content-img {
      height: 109px;
      position: relative;
      img {
        width: 100%;
        height: 100%;
        border-radius: 8px;
      }
      .tag {
        padding: 2px 8px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px 0px 8px 0px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 10px;
        color: #ffffff;
        line-height: 14px;
        text-align: center;
        font-style: normal;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
    .btn-info {
      padding: 7px 11px 13px 11px;
      .title {
        font-family: PingFangSC, PingFang SC;
        font-weight: 500;
        font-size: 14px;
        color: #2f3444;
        line-height: 20px;
        text-align: left;
        font-style: normal;
        white-space: nowrap; /* 防止换行 */
        overflow: hidden; /* 隐藏超出部分 */
        text-overflow: ellipsis; /* 显示省略号 */
        padding-bottom: 8px;
      }
      .desc {
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 12px;
        color: #676b6b;
        line-height: 17px;
        text-align: left;
        font-style: normal;
        white-space: nowrap; /* 防止换行 */
        overflow: hidden; /* 隐藏超出部分 */
        text-overflow: ellipsis; /* 显示省略号 */
        padding-bottom: 9px;
      }
      .wrap-desc {
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 12px;
        color: #676b6b;
        line-height: 17px;
        text-align: left;
        font-style: normal;
        .pic {
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 12px;
          color: #ffac24;
          line-height: 17px;
          text-align: left;
          font-style: normal;
        }
        .text {
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 12px;
          color: #676b6b;
          line-height: 17px;
          text-align: left;
          font-style: normal;
        }
      }
    }
  }
}
</style>
